home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir35
/
bdiff11.zip
/
README.BDF
< prev
Wrap
Text File
|
1994-08-25
|
9KB
|
240 lines
BinDiff V1.1
------------
Kris Coppieters
Weversstraat 23
B-8500 Kortrijk
Belgium
Europe
CompuServe: 100025,2724
Internet : 100025.2724@compuserve.com
Archive contents
----------------
BINDIFF.DIF A DIF file that allows you to create BINDIFF.EXE
BDEXTR.COM A DIF file decoder
README.BDF The file you're reading
MKBINDIF.BAT A batch file that creates BINDIFF.EXE from BINDIFF.DIF
Keep these four files together when redistributing!
What is BinDiff ?
-----------------
BinDiff is a program that is complementary to compression programs like PKZIP
and LHARC: it can be used to get higher compression rates (e.g. 10 x on large
.EXE files). It is useful when sending large files over slow communication
links, or when archiving multiple versions of a file in a condensed way.
An example shows how BinDiff works: assume you downloaded version 1
of a .EXE file from a BBS (in compressed or uncompressed form). Some time
later, version 2 appears. The author of the program can use BinDiff to create
a difference file that contains only the differences between the two versions;
this difference file will be small if there is not too much change.
You download the difference file (also in compressed or uncompressed form)
and use BinDiff to create a version 2 .EXE file, using the version 1
.EXE file you already had, and the downloaded difference file.
BinDiff works on all types of files: text files, binary files,...
It encodes similarities between the two files, even if parts of
one of the files are shuffled in a different order relatively to the other
file.
It will NOT work well on compressed files: use BinDiff only on
uncompressed files. Compressed files lack the structure needed by the
algorithm.
Creating ('encoding') a difference file is memory-consuming and can be slow,
but the reverse process ('decoding') is very fast and needs very little
memory.
BinDiff looks a bit like the diff program on Unix, but unlike diff, this
program works on all file types.
The diff file is NOT compressed, so you can gain extra space by compressing
the diff file with a normal compression program like LHARC or PKZIP. I chose
not to include compression in BinDiff, because it would be hard to do it
at least as well as dedicated programs: BinDiff is a diff creator, no more
and no less.
How to use it ?
---------------
BinDiff can be used from the command line with the following syntax:
BINDIFF <diff> = <updated> - <original>
or
BINDIFF <updated> = <original> + <diff>
where <diff>, <updated>, <orginal> are the names of the files involved.
You must enter the =, +, - signs with leading and trailing spaces,
otherwise they won't be recognized.
BINDIFF.EXE allows you to both encode (-) and decode (+) diff files.
BDEXTR.COM is a reduced version of BINDIFF.EXE: BDEXTR uses the same
syntax as BINDIFF, but only allows the addition of an original and
a diff file.
BDEXTR.COM can be distributed separated from this package for free: there
is no licensing fee for BDEXTR.COM: you are allowed to distribute BDEXTR.COM
together with your DIF files.
No particular extension for DIF files is enforced, but I propose to use
the extension .DIF.
Some examples
-------------
* Example: BINDIFF.EXE is not included in the package. Instead, you get
BINDIFF.DIF, which results from BINDIFF.EXE - BDEXTR.COM. To recreate
BINDIFF.EXE, you have to execute the following command (don't forget
to type the spaces surrounding the = and the +):
BDEXTR BINDIFF.EXE = BDEXTR.COM + BINDIFF.DIF
This applies the dif file to BDEXTR.COM and creates BINDIFF.EXE.
There is no big advantage in distributing BINDIFF.EXE this way: it is meant
as an example. However, if you compare the archived sizes of BINDIFF.DIF
and BINDIFF.EXE using LHARC or PKZIP, you see that a few hundred extra bytes
are saved by using BINDIFF.DIF.
* Example: X1.EXE and X2.EXE are two versions of a program; you want
to send X2.EXE to your friend who already has X1.EXE.
Enter the following command line (including spaces).
BINDIFF UPGR12.DIF = X2.EXE - X1.EXE
This creates the file UPGR12.DIF; you PKZIP this file and send it to your
friend. Your friend uses the command
BINDIFF X2.EXE = X1.EXE + UPGR12.DIF
or
BDEXTR X2.EXE = X1.EXE + UPGR12.DIF
to recreate the file X2.EXE.
* Example: by using the FOR command in MSDOS, you can create a set of difference
files for pairs of files stored in different directories. Suppose C:\DATA\ORG
is a directory containing the original files, C:\DATA\UPD the directory
containing the updated files, and C:\DATA\DIFF a directory to contain the
difference files. Use the follwing batch file
C:
CD \DATA\ORG
FOR %%I IN (*.*) DO BINDIFF C:\DATA\DIFF\%%I = C:\DATA\UPD\%%I - %%I
* Example: if you want to keep a single diff for a set of files, you can
use one of the 'tar' or 'ar' programs available on MSDOS to create a single
uncompressed archive and then use BinDiff to create a diff between this
archive and a previous version. You cannot use PKZIP or LHARC because they
compress and give BinDiff very little chance to find similarities between
two archives.
Some extra info
---------------
Check the size of the resulting difference file: if it almost the same size
as the original file, you might be better off not using the diff at all.
BinDiff is meant to work cross-platform with Mac. I will release a Macintosh
version shortly.
Error messages
--------------
'Cannot open file <file name>'
Explanation: for some reason this file cannot be opened. Possible causes:
misspelled file name, locked volumes, unexisting directories,...
'Cannot reopen file <file name>'
Explanation: for some reason the decoded file cannot be reopened for
checksum calculation. The resulting file may be ok, but was not checked.
'File <file name> lacks usable structure for this algorithm - sorry!'
Explanation: Some file types (compressed files, images, sounds) are too random
in nature for BinDiff. Use other means to compress them.
'Out of memory.'
The files involved are too large for BinDiff to process. Release as much
memory as you can by commenting drivers in CONFIG.SYS and TSR's in AUTOEXEC.BAT,
and by reducing memory-related settings (FILES,BUFFERS,STACKS,...).
Otherwise, use a version of BinDiff running on a platform without 640K
memory limit (OS/2, Macintosh, Unix).
'<file name> is not a recognisable diff file.'
Explanation: diff file is not the right format. Possible causes: misspelled
file name, the file looks like a diff but is not one (or comes from another
program),...
'<file name> is not the file the diff was created with.'
Explanation: the original file used to create the diff had different
contents from the original file you're using to apply the diff to.
'Unknown tag in diff file - possibly created by a more recent BinDiff.'
Explanation: BinDiff uses a tagged dif file format, and encountered
a tag it does not recognise. Either this file is not a dif file, or
maybe it got corrupted, or it was created with a more recent version
of BinDiff.
'<filename> is corrupt.'
Explanation: After decoding a file, BinDiff checks the result. If there
is a checksum error, the file is corrupt and likely to be unusable.
The most probable cause is a corrupt .DIF file.
Copying and licensing
---------------------
BinDiff is provided as is, without any expressed or implied warranty, and can
be freely used for non-commercial purposes. When re-distributing, you have to
distribute these four files in a single archive: BDEXTR.COM, BINDIFF.DIF,
README.BDF, MKBINDIF.BAT.
BDEXTR.COM can be distributed together with your DIF files for free.
If you use this program for non-commercial purposes, and you find it useful,
I would be very pleased to receive a postcard or an e-mail.
This gives me an indication of the usefulness of my program, and encourages
me to improve it.
When creating diffs for large files, BinDiff might run out of memory on MS-DOS
platforms. If you have an OS/2, Unix or big Macintosh system nearby, a version
running on one of those platforms can be used to encode the diff files: no
640 K limit is hindering BinDiff's performance.
The resulting files are portable to MSDOS, so the decoding will work on MS-DOS,
as decoding needs very little memory and performance. Contact me if you need
a version for one of these other platforms.
For commercial purposes or source licenses, please contact me by mail or e-mail.
I can create custom versions of BinDiff on demand, tuned to specific file types
(e.g. very large database files: this version of BinDiff is not made for this
type of file: it is too slow and memory-intensive for very large files).
Change history
--------------
BinDiff 1.0 released on 22 july 1994.
BinDiff 1.1 uses a better and faster algorithm than BinDiff 1.0. The files
are not interchangable; BinDiff 1.1 is a completely different program.
Kris Coppieters - 20 august 1994 - Kortrijk, Belgium.